#pragma  once
#include <boost/signals2.hpp>

namespace yet{


namespace Notify{
	typedef boost::function<void (void* instance, int, boost::any)> NotifyCallback;
	
	void Fire(void* instance, int msg, boost::any data = boost::any());
	boost::signals2::connection Add(void* instance, int msg, NotifyCallback callback, int group = 10, boost::signals2::connect_position pos=boost::signals2::at_back);
	boost::signals2::connection Add(void* instance, NotifyCallback callback, int group = 10, boost::signals2::connect_position pos=boost::signals2::at_back);
	void Remove(boost::signals2::connection con);
	void Remove(void* instance, int msg);
	void Remove(void* instance);
};

}
